package com.syx.product.Controller;

import com.syx.product.Model.ProductInfo;
import com.syx.product.Service.ProductService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("product")
public class ProductController {

    @Resource
    ProductService productService;


    @RequestMapping("/{id}")
    public ProductInfo getProductId(@PathVariable("id") Integer id){
        return productService.selectByProductById(id);




    }
}
